home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / infosrvr / dev / libhtml_.tar / HMDoc.h < prev    next >
C/C++ Source or Header  |  1993-01-21  |  2KB  |  76 lines

  1. /* HMDoc.h -- HyperMedia Document class definition
  2.  * $Id$
  3.  */
  4.  
  5. #ifndef HMDoc_h
  6. #define HMDoc_h
  7.  
  8. #include "c_dialect.h"
  9. /* @@ get rid of this depenency... */
  10. #include <stdio.h>
  11.  
  12. typedef struct _HMDoc HMDoc;
  13.  
  14. typedef struct{
  15.   char* name;
  16.   char* value;
  17. }HMBinding;
  18.  
  19.  
  20. typedef HMDoc*
  21.   HMFileWriterProc PARAMS((FILE* fp));
  22.  
  23. typedef VOIDPTR HMStream;
  24.  
  25. typedef int HMGetcProc PARAMS((HMStream in));
  26.  
  27. typedef int HMWriteProc PARAMS((HMStream out,
  28.                 CONST VOIDPTR buf,
  29.                 unsigned nbytes));
  30.  
  31. typedef HMDoc*
  32.   HMWriterProc PARAMS((HMStream out, HMWriteProc write));
  33.  
  34. typedef VOID
  35.   HMDeleteProc PARAMS((HMDoc* this));
  36.  
  37. typedef int
  38.   HMStartTagProc PARAMS((HMDoc* this,
  39.              CONST char* gi,
  40.              CONST HMBinding attributes[],
  41.              int nattrs));
  42. typedef VOID
  43.   HMEndTagProc PARAMS((HMDoc* this,
  44.                CONST char* gi));
  45.  
  46. typedef VOID
  47.   HMDataProc PARAMS((HMDoc* this,
  48.              CONST char* data,
  49.              int char_qty));
  50. typedef CONST char*
  51.   HMEntityProc PARAMS((HMDoc* this, CONST char* name));
  52.  
  53. typedef struct{
  54.   /* class methods... */
  55.   HMFileWriterProc *fileWriter;
  56.   HMWriterProc *writer;
  57.  
  58.   /* instance methods */
  59.   HMDeleteProc *delete;
  60.   HMStartTagProc *startTag;
  61.   HMEndTagProc *endTag;
  62.   HMDataProc *data;
  63.   HMEntityProc *entityText;
  64.   /*@@ EOFProc *eof */
  65. }HMDoc_Class;
  66.  
  67. typedef VOID HMParseProc PARAMS((HMStream stream, HMGetcProc getc,
  68.                  HMDoc* document,
  69.                  CONST HMDoc_Class *docclass));
  70.  
  71. extern HMDoc_Class InCore;
  72. HMDoc* InCore_new PARAMS(());
  73. VOID InCore_traverse PARAMS((HMDoc* this, HMDoc* that, HMDoc_Class* docclass));
  74.  
  75. #endif
  76.